#-*- coding: utf-8 -*-
'''
'''
from apps import app
from apps import db
from flask import Flask, json, request,Response,jsonify,render_template
import apps._nlib

@app.route('/html01')
def html01():
        return render_template('html01.html')

@app.teardown_request
def shutdown_session(exception=None):
    print('teardown_request')
    db.session.remove()


@app.before_request
def before_request():
    print('before_request')

@app.errorhandler(404)
def not_found(error=None):
    message = {
        'status': 404,
        'message': 'Not Found: ' + request.url,
    }
    resp = jsonify(message)
    resp.status_code = 404

    return resp